package com.atguigu.order.feign;

import com.atguigu.order.feign.fallback.OrderFeignClientFallback;
import com.atguigu.product.bean.Product;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;

@FeignClient(value = "service-product",fallback = OrderFeignClientFallback.class)
public interface OrderFeignClient {

    @GetMapping("/product/{id}")
    public Product getProduct(@PathVariable("id") Long productId);
}
